<template>
    <van-tabbar v-model="active" active-color="#ee0a24">
        <van-tabbar-item v-for="item in home" :icon="item.icon" @click="gofind(item.name)" :name="item.name">{{ item.name }}</van-tabbar-item>
    </van-tabbar>
</template>

<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router';
const router = useRouter()
const active = ref('发现')
const home = ref([{
    icon: 'service-o',
    name: '发现'
}, {
    icon: 'manager-o',
    name: '我的'
}])
const gofind = (name) => {
    if(name == '发现'){
        router.push(
        {
            path: '/find'
        }
    )
    }else{
        router.push(
        {
            path: '/mine'
        })
    }
   
}
</script>

<style scoped>

</style>